#import "DiggStoryBridge.h"
#import "XMLReader.h"

@implementation DiggStoryBridge

- (NSMutableArray*) getLatestStories {
	NSMutableArray* stories = [[NSMutableArray alloc] init];
	for (int i = 0; i < 10; i++) {
		DiggStory* story = [[DiggStory alloc] initWithFakeData];
		[stories addObject:story];
		[story release];
	}
	return stories;
}

//- (NSMutableArray*) getLatestStories {
//	NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://services.digg.com/stories?appkey=http%3A%2F%2Fbackhoe.googlecode.com"]];
//	NSURLResponse *resp = nil;
//	NSError *err = nil;
//	NSData *response = [NSURLConnection sendSynchronousRequest: request returningResponse: &resp error: &err];
//	NSDictionary *uinfo = [err userInfo];
//	if ([uinfo count] > 0)
//	{
//		NSString *errstr = [uinfo objectForKey: NSLocalizedDescriptionKey];
//		NSLog(@"submitGetRequest Error: %@", errstr); 
//	}
//	NSString * result = [[NSString alloc] initWithData:response encoding:NSUTF8StringEncoding];
//	NSLog(@"Result: ", @"%@", result);
//	return nil;
//}

@end
